﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MatHangList.aspx.cs" Inherits="WebApplication.Admin.MatHangList"
    MasterPageFile="~/Admin/Web.Master" %>

<asp:Content ContentPlaceHolderID="Header" runat="server">
</asp:Content>
<asp:Content ContentPlaceHolderID="maint" runat="server">
    <div style="float:right">
 <asp:LinkButton runat="server" ID="lbtnthemmoi" CssClass="btn btn-info" onclick="lbtnthemmoi_Click" 
               >Thêm mới</asp:LinkButton>
</div><br />
<div style="margin-top:25px">
    <asp:GridView ID="GrMathang" runat="server" CssClass="table table-striped table-bordered table-hover"
        AutoGenerateColumns="False" OnRowCommand="GrMathang_RowCommand" OnRowDataBound="GrMathang_RowDataBound" AllowPaging="True" OnSelectedIndexChanging="GrMathang_SelectedIndexChanging">
        <Columns>
           <asp:TemplateField HeaderText="STT">
    <ItemTemplate>
    <%# Container.DataItemIndex+1 %>
    </ItemTemplate>
    </asp:TemplateField>
            <asp:BoundField DataField="MAMH" HeaderText="Mã mặt hàng" />
            <asp:BoundField DataField="TENMH" HeaderText="Tên mặt hàng" />
            <asp:BoundField DataField="SOLUONGMH" HeaderText="Số lượng" />
            <asp:BoundField DataField="GIAMUA" HeaderText="Giá nhập" />
            <asp:BoundField DataField="GIABAN" HeaderText="Giá bán" />
            <asp:TemplateField HeaderText="Thuế">
                <ItemTemplate>
                    <asp:Label ID="lbthue" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Loại hàng">
                <ItemTemplate>
                    <asp:Label ID="lbnhomh" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Đơn vị tính">
                <ItemTemplate>
                    <asp:Label ID="lbdonvitinh" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="MOTA" HeaderText="Mô tả" />
            <asp:TemplateField HeaderText="Tình trạng">
             <ItemTemplate>
             <asp:Label ID="lbtinhtrang" runat="server"></asp:Label>
             </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Kho">
                <ItemTemplate>
                    <asp:Label ID="lbkho" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Chức năng">
                <ItemTemplate>
                    <asp:LinkButton runat="server" ID="lbtnsua" CommandName="lbtnsua" CommandArgument='<%#Bind("MAMH") %>'><i class="icon-pencil bigger-130"></i></asp:LinkButton>
                    <asp:LinkButton runat="server" ID="lbtnxoa" CommandName="lbtnxoa" CommandArgument='<%#Bind("MAMH") %>' OnClientClick="return confirm('Bạn có muỗn xóa không ?');"><i class="icon-trash bigger-130 red"></i></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
  </div>
</asp:Content>
